home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / var / lib / dpkg / info / ndiswrapper-utils-1.1.postinst < prev    next >
Encoding:
Text File  |  2006-07-11  |  605 b   |  26 lines

  1. #!/bin/sh
  2.  
  3. set -e
  4.  
  5. if [ "$1" = "configure" -a ! -z "$2" ]; then
  6.  
  7.     # Newer versions of ndiswrapper (> 1.0rc3) expect conf files to have
  8.     # the bustype in the file name.  So, for upgrades from older versions,
  9.     # assume a bustype of PCI ('5'), and make appropriate symlinks.
  10.     if dpkg --compare-versions "$2" lt "1.0-1"; then
  11.         confs=/etc/ndiswrapper/*/*.conf
  12.         if [ "$confs" != "$(echo $confs)" ]; then
  13.             for c in $confs; do
  14.                 match=$(basename $c | grep -o ':[0-9]\+\.[0-9]\.conf' || true)
  15.                 if [ -z "$match" ]; then
  16.                     ln -sf "$(basename $c)" "${c%.conf}.5.conf"
  17.                 fi
  18.             done
  19.         fi
  20.     fi
  21. fi
  22.  
  23.  
  24.  
  25. exit 0
  26.